import React, { Component } from 'react'
import Small from './Small'
import SmallFn from './SmallFn'

export default class Homes extends Component {
    state = {
        count: 8888
    }
    add = () => {
        this.setState({
            count: this.state.count += 1
        })
    }
    render() {
        const { count } = this.state
        return (
            <div>
                <h2>
                    { count }
                </h2>
                <button onClick = {() => {
                    this.add()
                }}>++++</button>
                <SmallFn count = { count }/>
            </div>
        )
    }
}
